package demo2.assignment3;

import java.util.HashMap;

/**
 * @author Leon(赵亮)
 * @version 1.0.0
 * 10 Sep 2021
 * this is test function
 */
public class AdapterTest {

    public static void main(String[] args) throws InterruptedException {

        UserInfo userInfo = new UserInfo();
        userInfo.setNumber(14);
        userInfo.setName("Leon");
        userInfo.setHomeAddress("West Youyi 128 NWPU");
        HashMap<String, String> teles = new HashMap<>();
        teles.put("phone", "18899996666");
        userInfo.setTeles(teles);

        System.out.println("the init user is " + userInfo);
        System.err.println("adapter is running ...");
        Thread.sleep(2000);
        FacultyMemberAdapter facultyMemberAdapter = new FacultyMemberAdapter();
        FacultyMember facultyMember = facultyMemberAdapter.adapter(userInfo);
        System.out.println("the new Faculty member is " + facultyMember);
    }
}
